package fr.mairie.parc.dao.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;


import fr.mairie.parc.domain.User;

public class UserResultSetExtractor implements ResultSetExtractor{
	
	@Override
	public Object extractData(ResultSet rs) throws SQLException,
			DataAccessException {
			User user= new User();
			user.setIdUser(rs.getInt(1));
			user.setIdMateriel(rs.getInt(2));
			user.setNom(rs.getString(3));
			user.setPrenom(rs.getString(4));
			user.setDirection(rs.getString(5));
			user.setService(rs.getString(6));
			user.setBatiment(rs.getString(7));
			user.setEtage(rs.getString(8));
			user.setBureau(rs.getString(9));
		
		return user;
	}

}
